package com.java1234.jxc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2018/3/17.
 */
@Controller
public class IndexController {

    @RequestMapping("/")
    public String root(){

        return "redirect:/login.html";
    }

    @RequestMapping("/auth/error/{type}")
    @ResponseBody
    public Map<String,Object> error(@PathVariable("type") String type){
        Map<String,Object> map = new HashMap<>();

        map.put("success",false);
        map.put("errorInfo",type);
        return  map;

    }

}
